<div class="full_w">
    <div class="h_title"><?php echo Yii::t('AdmincpModule.admincp', 'Add Role'); ?></div>
    <?php 
        foreach(Yii::app()->admin->getFlashes() as $key => $message){
            echo '<div class="n_'.$key.'"><p>'.$message."</p></div>\n";
        }
    ?>
    <form action="" method="post" id="frmRole">
    	<div class="element">
            <label>Name <span class="red">*</span></label>
            <input type="text" name="role[role_name]" id="role_name" class="text required"  maxlength="50" value="<?php echo isset($arrItemInfo['role_name'])?$arrItemInfo['role_name']:null; ?>">
        </div>
        <div class="element">
            <label>Description</label>
            <textarea class="textarea" name="role[role_description]" id="role_description" maxlength="1024"><?php echo isset($arrItemInfo['role_description'])?$arrItemInfo['role_description']:null; ?></textarea>
        </div>
        <div class="element">
            <label>
            	<input type="checkbox" name="role[role_is_default]" id="role_is_default" value="1" style="float:left; margin:0 5px;" <?php if (isset($arrItemInfo['role_is_default']) && $arrItemInfo['role_is_default'] == '1'): ?>checked<?php endif; ?>>
            	Default Role
            </label>
        </div>
        <div class="element">
            <label>
            	<input type="checkbox" name="role[role_is_admin]" id="role_is_admin" value="1" style="float:left; margin:0 5px;" <?php if (isset($arrItemInfo['role_is_admin']) && $arrItemInfo['role_is_admin'] == '1'): ?>checked<?php endif; ?>>
            	Administrative Role
            </label>
        </div>
        <div class="entry">
            <input type="hidden" name="id" id="id" value="<?php echo isset($arrItemInfo['role_id'])?$arrItemInfo['role_id']:null; ?>">
            <button type="submit">Submit</button> <button>Cancel</button>
        </div>
    </form>
</div>
<script type="text/javascript">
	$(function(){
		$('#frmRole').validate();
	});
</script>